package com.uchedao.vehicledetection.view.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.TextView;

import com.uchedao.vehicledetection.R;

/**
 * Description:
 * Date: 2015-09-11  12:27
 * User: wushan
 */
public class ItemTextview extends TextView {

    private Paint mPaint;
    private Context mContext;
    private String mTitleMsg;

    public ItemTextview(Context context) {
        super(context);
    }

    public ItemTextview(Context context, AttributeSet attrs) {
        super(context, attrs);


        TypedArray a = context.obtainStyledAttributes(attrs,
                R.styleable.itemTexView);
        String title = a.getString(R.styleable.itemTexView_title_text);
        System.out.println("ws----"+title);
        mTitleMsg = getText().toString();
        System.out.println("ws----text---"+getText());
//        setText(title);
    }

    public ItemTextview(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

   public void addTextMsg(String msg){

      setText(mTitleMsg+"  "+msg);

   }


}
